package com.ksd.system.service.impl;

import java.util.List;

import com.ksd.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ksd.system.mapper.SysMusicDataMapper;
import com.ksd.system.domain.SysMusicData;
import com.ksd.system.service.ISysMusicDataService;

/**
 * 纯音乐享Service业务层处理
 * 
 * @author y.wu
 * @date 2025-09-05
 */
@Service
public class SysMusicDataServiceImpl implements ISysMusicDataService 
{
    @Autowired
    private SysMusicDataMapper sysMusicDataMapper;

    /**
     * 查询纯音乐享
     * 
     * @param id 纯音乐享主键
     * @return 纯音乐享
     */
    @Override
    public SysMusicData selectSysMusicDataById(Long id)
    {
        return sysMusicDataMapper.selectSysMusicDataById(id);
    }

    /**
     * 查询纯音乐享列表
     * 
     * @param sysMusicData 纯音乐享
     * @return 纯音乐享
     */
    @Override
    public List<SysMusicData> selectSysMusicDataList(SysMusicData sysMusicData)
    {
        return sysMusicDataMapper.selectSysMusicDataList(sysMusicData);
    }

    /**
     * 新增纯音乐享
     * 
     * @param sysMusicData 纯音乐享
     * @return 结果
     */
    @Override
    public int insertSysMusicData(SysMusicData sysMusicData)
    {
        sysMusicData.setCreateTime(DateUtils.getNowDate());
        return sysMusicDataMapper.insertSysMusicData(sysMusicData);
    }

    /**
     * 修改纯音乐享
     * 
     * @param sysMusicData 纯音乐享
     * @return 结果
     */
    @Override
    public int updateSysMusicData(SysMusicData sysMusicData)
    {
        return sysMusicDataMapper.updateSysMusicData(sysMusicData);
    }

    /**
     * 批量删除纯音乐享
     * 
     * @param ids 需要删除的纯音乐享主键
     * @return 结果
     */
    @Override
    public int deleteSysMusicDataByIds(Long[] ids)
    {
        return sysMusicDataMapper.deleteSysMusicDataByIds(ids);
    }

    /**
     * 删除纯音乐享信息
     * 
     * @param id 纯音乐享主键
     * @return 结果
     */
    @Override
    public int deleteSysMusicDataById(Long id)
    {
        return sysMusicDataMapper.deleteSysMusicDataById(id);
    }
}
